package cpa.prowon.gui.actions;

import cpa.prowon.gui.*;

/**
 * This action is called to close the main window. The window gets closed without asking
 * the user whether he is really sure or not
 * @author Chris
 */
public class ExitAction extends PatchedAction {

	/**
	 * Constructor
	 * @param MainWindow The window where the action is used
	 * @author Chris
	 */
	public ExitAction(MainWindow w) {
		super(w);
	}
	
	/**
	 * Return the title key
	 * @return The title key
	 * @author Chris
	 */
	protected String getTitleKey() {
		return "menu_item_file_exit";
	}

	/**
	 * Return the tooltip key
	 * @return The tootip key
	 * @author Chris
	 */
	protected String getTooltipKey() {
		return "menu_item_file_exit_tooltip";
	}

	/**
	 * Return the image key
	 * @return The image key
	 * @author Chris
	 */
	protected String getImageKey() {
		return "";
	}

	/**
	 * Run the action
	 * @author Chris
	 */
	public void run() {
		
		// Do the cleanup work
		window.cleanup();
		
		// Close the window
		window.close();
		
	}

}
